<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script>
    function getMax () {
        var max = arguments[0];
        for (var i = 0;i < arguments.length;i++){
            if(arguments[i] > max){
                max = arguments[i];
            }
        }
        return max;
    }
    console.log(getMax(1,5,3,7,5,10,18))
</script>
<body>

</body>
</html>